Modernize agent (uv + LiveKit Inference) and update all dependencies#39
Merged
Conversation
Modernize the agent's tooling and model integration: - Replace requirements.txt and ruff.toml with a uv-managed pyproject.toml + uv.lock, on the latest LiveKit Agents SDK (~=1.5) and bumped dependencies. - Switch the vision/judging LLM calls from the OpenAI SDK directly to LiveKit Inference (openai/gpt-4o-mini). Inference authenticates with the existing LIVEKIT_API_KEY/SECRET, so no separate OPENAI_API_KEY is required. - Rewrite the Dockerfile as a multi-stage uv build and stop ignoring it in git; remove the fly.toml deployment file. - Update README setup instructions to use uv and drop the OpenAI key.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Agent (uv): - Bump livekit-agents 1.5.16 -> 1.5.17, openai 2.40 -> 2.41, and minor transitive deps via `uv lock --upgrade`. Web (pnpm) - upgrade everything to latest, including major versions: - next 14 -> 16, react/react-dom 18 -> 19, tailwindcss 3 -> 4, typescript 5 -> 6, eslint 8 -> 9, eslint-config-next 14 -> 16, plus LiveKit SDKs and type packages. Migration work for the major bumps: - Next 16 / React 19: move viewport/themeColor into a `viewport` export; pin Turbopack workspace root in next.config.mjs. - Tailwind v4: drop tailwind.config.ts (sources are auto-detected), switch to @tailwindcss/postcss, and use v4 layer imports in globals.css. Keep the "no preflight" setup so 98.css styling isn't reset. - ESLint 9 flat config: replace .eslintrc with eslint.config.mjs and point the lint scripts at the eslint CLI (next lint was removed in Next 16). Pin eslint to 9 since eslint-config-next 16's plugins require <=9. - Add a .prettierignore so build output isn't format-checked. The new react-hooks `set-state-in-effect` rule is set to a warning: the providers intentionally initialize state from browser APIs in mount effects for SSR safety. Verified: pnpm build (TS 6), lint, and format:check pass; agent registers; frontend renders and the token API works.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Modernizes the project's tooling and brings every dependency up to the latest version across both the agent and the web frontend. Also includes a livekit.toml for deployment to livekit cloud.
Agent
Tooling → uv
requirements.txtandruff.tomlwith a uv-managedpyproject.toml+ committeduv.lock.[tool.ruff].Model → LiveKit Inference
openai/gpt-4o-mini).LIVEKIT_API_KEY/LIVEKIT_API_SECRET, soOPENAI_API_KEYis no longer required.ChatContextwithImageContentand stream through a small_llm_complete()helper; JSON output usesresponse_formatviaextra_kwargs.Deployment
Dockerfileas a multi-stage uv build (build toolchain stays out of the runtime image; runs as non-rootappuser; ~456MB). Stop git-ignoring it so it's tracked.uvand drop the OpenAI key requirement.Dependencies
livekit-agents1.5.17),openai2.41, and refreshed transitive deps.Web frontend
Every dependency updated to latest, including major versions:
Migration work required by the major bumps:
viewport/themeColorout ofmetadatainto a dedicatedviewportexport; pin the Turbopack workspace root innext.config.mjs(avoids inferring an unrelated parent-dir lockfile).tsconfig.jsonupdated by Next (jsx→react-jsx). NoforwardRef/legacy-render changes needed.tailwind.config.ts(v4 auto-detects sources), switch PostCSS to@tailwindcss/postcss, and use v4 layer imports inglobals.css. Deliberately preserved the "no preflight" setup so Tailwind's reset doesn't clobber the98.cssretro styling (verified the built CSS contains the utilities but none of Tailwind's universal reset).next lintwas removed in Next 16, so.eslintrcwas converted toeslint.config.mjsand the lint scripts now call the ESLint CLI. Pinned ESLint to 9 becauseeslint-config-next16's bundled plugins requireeslint <= 9(10 would break linting). Added a.prettierignoreso build output isn't format-checked.Note on a lint rule
The React 19-era react-hooks plugin adds a
set-state-in-effectrule that flags 5 intentional, SSR-safe patterns in the providers (initializing state fromlocalStorage/window.location.hashin mount effects). Rewriting those is a behavior-risky refactor that's out of scope for a dependency bump, so the rule is set towarn(with an explanatory comment) rather than failing lint.Testing
uv sync,uv lock --locked,ruff checkpass; modules import against the new SDK; Docker image builds and the runtime image smoke-tests clean. Live-tested LiveKit Inference end-to-end (vision guess + JSON winners).pnpm build(TypeScript 6),pnpm lint(0 errors), andpnpm format:checkall pass.